package com.zyl.tvolatile.single;

/**
 * @author zhaoyl
 * @date 2024/5/20 16:50
 * @description 说明
 * 饿汉式单例
 */
public class Hungry {
    //可能会浪费内存空间
    private  byte[] data1 = new byte[1024];
    public Hungry() {
    }
    private  final static Hungry HUNGRY= new Hungry();

    public static Hungry getInstance(){
        return HUNGRY;
    }
}
